home *** CD-ROM | disk | FTP | other *** search
/ User's Choice Windows CD / User's Choice Windows CD (CMS Software)(1993).iso / windows4 / pcproj.zip / PERTDIAL.CLS < prev    next >
Text File  |  1988-11-22  |  1KB  |  47 lines

  1. /* PERT Tasks have additional fields that can be edited.
  2.    This class descends from class TaskDialog and inherits
  3.    all of its data and operations.
  4. */!!
  5.  
  6. inherit(TaskDialog, #PERTDialog, nil, 2, nil)!!
  7.  
  8. now(PERTDialogClass)!!
  9.  
  10. now(PERTDialog)!!
  11.  
  12. /* Set the values of the activity. */
  13. Def  setValues(self | ues, ulf)
  14. {
  15.   ues := checkDate(getItemText(self, UES));
  16.   ulf := checkDate(getItemText(self, ULF));
  17.   setValues(activity, tuple(
  18.     getItemText(self, NAME),
  19.     getItemText(self, DESC),
  20.     ues,
  21.     ulf,
  22.     asDec(getItemText(self, LIKELY_TIME)),
  23.     asDec(getItemText(self, BEST_TIME)),
  24.     asDec(getItemText(self, WORST_TIME)),
  25.     asDec(getItemText(self, FC)),
  26.     getItemText(self, RES)));
  27. } !!
  28.  
  29. /* Return the resource ID that should be used with this
  30.    dialog box. */
  31. Def  res(self)
  32. {
  33.   ^PERT_BOX;
  34. }!!
  35.  
  36. /* Initialize the dialog so all fields have the correct values. */
  37. Def initDialog(self, wp, lp)
  38. {
  39.   initDialog(self:TaskDialog, wp, lp);    /* use ancestor init */
  40.  
  41.   setItemText(self, LIKELY_TIME, asString(getLikelyTime(activity)));
  42.   setItemText(self, BEST_TIME, asString(getBestTime(activity)));
  43.   setItemText(self, WORST_TIME, asString(getWorstTime(activity)));
  44. }
  45. !!
  46.  
  47.